<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        table,td{
            border: 1px solid red;
            border-collapse: collapse;
        }
    </style>
</head>
<body>
    <input type="button" value="添加" id="add">
    <input type="button" value="删除" id="re">
    <input type="button" value="改变" id="change">
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
    $(function(){
        var table1=$("<table><tr><td>1</td><td>1</td><td>1</td></tr><tr><td>1</td><td>1</td><td>1</td></tr><tr><td>1</td><td>1</td><td>1</td></tr></table>");
         $("body").append(table1);
         //点击添加按钮
        $("#add").click(function(){
            var t1=$("<tr><td>1</td><td>1</td><td>1</td></tr>");
            table1.append(t1);
//            table1.attr("id","box");
//            $("#box tr").last().css({"color":"blue"});
        });


        //删除一行
        $("#re").click(function(){
            $("#box tr").last().remove();
        });

        //改变文本
        $("#change").click(function(){
            $("#box td").html("改变文本");
        });

    });


</script>
</body>
</html>